Skip to content

hwdef: Add JFB200 of JAE flight controllers#32786

Open
n-ito2222 wants to merge 2 commits into
ArduPilot:masterfrom
jfbblue0922:pr-Add_hwdef_JFB200
Open

hwdef: Add JFB200 of JAE flight controllers#32786
n-ito2222 wants to merge 2 commits into
ArduPilot:masterfrom
jfbblue0922:pr-Add_hwdef_JFB200

Conversation

@n-ito2222
Copy link
Copy Markdown
Contributor

Summary

Add hwdef JFB200 for a JAE new flight controller.

Classification & Testing (check all that apply and add your own)

  • Checked by a human programmer
  • Non-functional change
  • No-binary change
  • Infrastructure change (e.g. unit tests, helper scripts)
  • Automated test(s) verify changes (e.g. unit test, autotest)
  • Tested manually, description below (e.g. SITL)
  • Tested on hardware
  • Logs attached
  • Logs available on request

@peterbarker
Copy link
Copy Markdown
Contributor

libraries/AP_HAL_ChibiOS/hwdef/JFB200/README.md:50 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- PWM  1,  2,  3 and  4 in gro..."]
libraries/AP_HAL_ChibiOS/hwdef/JFB200/README.md:77 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- PWM(9)  50"]
libraries/AP_HAL_ChibiOS/hwdef/JFB200/README.md:91 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- ADC Pin0  -> not used"]
libraries/AP_HAL_ChibiOS/hwdef/JFB200/README.md:116 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- the internal I2C port  is bu..."]
libraries/AP_HAL_ChibiOS/hwdef/JFB200/README.md:128 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- ARMED status signal output"]

Comment thread libraries/AP_HAL_ChibiOS/hwdef/JFB200/hwdef.dat Outdated
Comment thread libraries/AP_HAL_ChibiOS/hwdef/JFB200/hwdef.dat Outdated
Comment thread libraries/AP_HAL_ChibiOS/hwdef/JFB200/hwdef.dat Outdated
Comment thread libraries/AP_HAL_ChibiOS/hwdef/JFB200/hwdef.dat Outdated
Comment thread libraries/AP_HAL_ChibiOS/hwdef/JFB200/hwdef-bl.dat Outdated
Comment thread libraries/AP_HAL_ChibiOS/hwdef/JFB200/hwdef.dat Outdated
@rmackay9 rmackay9 added the WikiNeeded needs wiki update label Apr 21, 2026
@rmackay9
Copy link
Copy Markdown
Contributor

rmackay9 commented Apr 22, 2026

Hi @n-ito2222,

I suspect you're working on the PR and it's not quite done yet but I just want to point out that we don't accept merge commits so it would be good to rebase this on master to remove the one that has appeared.

@n-ito2222 n-ito2222 force-pushed the pr-Add_hwdef_JFB200 branch from 51a5823 to 1222179 Compare April 22, 2026 00:11
@n-ito2222
Copy link
Copy Markdown
Contributor Author

n-ito2222 commented Apr 22, 2026

HI @rmackay9,

Hi @n-ito2222,

I suspect you're working on the PR and it's not quite done yet but I just want to point out that we don't accept merge commits so it would be good to rebase this on master to remove the one that has appeared.

I'm sorry.
I made a mistake in the operation.

@n-ito2222
Copy link
Copy Markdown
Contributor Author

n-ito2222 commented Apr 22, 2026

Hi @rmackay9, @peterbarker ,
I've made revisions based on the review comments, and updated this PR.

Thank you for your cooperation.

Comment thread libraries/AP_HAL_ChibiOS/hwdef/JFB200/defaults.parm Outdated
Comment thread libraries/AP_HAL_ChibiOS/hwdef/JFB200/hwdef-bl.dat Outdated
Comment thread libraries/AP_HAL_ChibiOS/hwdef/JFB200/hwdef-bl.dat Outdated
Comment thread libraries/AP_HAL_ChibiOS/hwdef/JFB200/hwdef-bl.dat

## MCU class and specific type
MCU STM32H7xx STM32H755xx
define CORE_CM7
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't think this does anything - remove

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @andyp1per,

Excuse me.
If I remove define CORE-CM7, the build fails.
Are there any other settings I need to configure?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that should absolutely not be the case

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing "define CORE_CM7" will cause an error at the following code :
https://raw.githubusercontent.com/ArduPilot/ChibiOS/73f152d383775897584c60e3b597cf42a1dd74cd/os/common/ext/ST/STM32H7xx/stm32h755xx.h#224-#245

#ifdef CORE_CM4
#define __CM4_REV                 0x0001U  /*!< Cortex-M4 revision r0p1                       */
 :
#else  /* CORE_CM7 */
#ifdef CORE_CM7
#define __CM7_REV               0x0100U   /*!< Cortex-M7 revision r1p0                       */
 :
#else  /* UNKNOWN_CORE */
#error Please #define CORE_CM4 or CORE_CM7
#endif /* CORE_CM7 */
#endif /* CORE_CM4 *

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok I see, its specific to H755 - its the wrong way to fix it but I see everyone else has done the same so just keep it I think

PA14 JTCK-SWCLK SWD

## telem1
PE8 UART7_TX UART7 SPEED_VERYLOW
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERYLOW?

Comment thread libraries/AP_HAL_ChibiOS/hwdef/JFB200/hwdef.dat Outdated
Comment thread libraries/AP_HAL_ChibiOS/hwdef/JFB200/hwdef.dat Outdated
Comment thread libraries/AP_HAL_ChibiOS/hwdef/JFB200/hwdef.dat Outdated
Comment thread libraries/AP_HAL_ChibiOS/hwdef/JFB200/hwdef.dat
@rmackay9
Copy link
Copy Markdown
Contributor

@andyp1per, thank you very much for the review!

Copy link
Copy Markdown
Contributor

@Hwurzburg Hwurzburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I need images before I can review....see wiki for README requirements https://ardupilot.org/dev/docs/readme_file.html#readme-file
  • everything in the defaults.param file should be removed...rssi params should not be set...user should set..IMU mask is default,,,,serial protocols in hwdef..that bd voltage min is too low...everything should be able to take 4.75V as a min in a proper design
  • commit structure incorrect

@n-ito2222
Copy link
Copy Markdown
Contributor Author

Hi @Hwurzburg,

Thanks.

  • I need images before I can review....see wiki for README requirements https://ardupilot.org/dev/docs/readme_file.html#readme-file
  • everything in the defaults.param file should be removed...rssi params should not be set...user should set..IMU mask is default,,,,serial protocols in hwdef..that bd voltage min is too low...everything should be able to take 4.75V as a min in a proper design
  • commit structure incorrect

I will modify Readme.md and delete defaults.param.

I'm sorry.
I don't understand "commit structure incorrect". Could you please point out where the wrong are?

@rmackay9
Copy link
Copy Markdown
Contributor

Hi @n-ito2222,

Re the "commit structure" issue, I think the problem is that the bootloaders should be in a separate commit and that commit title should be prefixed with "Tools:". So it should be something like, "Tools: add JFB200 bootloaders"

@n-ito2222
Copy link
Copy Markdown
Contributor Author

HI @rmackay9,

Thanks.

Hi @n-ito2222,

Re the "commit structure" issue, I think the problem is that the bootloaders should be in a separate commit and that commit title should be prefixed with "Tools:". So it should be something like, "Tools: add JFB200 bootloaders"

I understand.
I will create a new pull request for binary of bootloader after this pull request is closed.

@n-ito2222
Copy link
Copy Markdown
Contributor Author

Hi @Hwurzburg,

Hi @Hwurzburg,

Thanks.

  • I need images before I can review....see wiki for README requirements https://ardupilot.org/dev/docs/readme_file.html#readme-file
  • everything in the defaults.param file should be removed...rssi params should not be set...user should set..IMU mask is default,,,,serial protocols in hwdef..that bd voltage min is too low...everything should be able to take 4.75V as a min in a proper design
  • commit structure incorrect

I will modify Readme.md and delete defaults.param.

I'm sorry. I don't understand "commit structure incorrect". Could you please point out where the wrong are?

I'm sorry, I commented that I would delete defaults.param, but I would like to keep "BRD_VBUS_MIN 4.75".
I would like that our JFB200 board need 4.75V minimum.

Thank you for your cooperation.

@rmackay9
Copy link
Copy Markdown
Contributor

Hi @n-ito2222,

Re the bootloaders, no need to put them into a separate PR. They just need to be in separate commits within this PR. In fact, we won't merge this unless those bootloader changes are split into a separate commit. If you're not sure how to do that using git I could do it for you.

@n-ito2222
Copy link
Copy Markdown
Contributor Author

Hi @rmackay9,

Thanks.
I understand. I will separate the commit for the bootloader binary.

@n-ito2222 n-ito2222 requested review from Hwurzburg and andyp1per May 14, 2026 05:16
@n-ito2222 n-ito2222 force-pushed the pr-Add_hwdef_JFB200 branch from 1222179 to f79c5e0 Compare May 14, 2026 05:23
@rmackay9
Copy link
Copy Markdown
Contributor

Hi @n-ito2222,

You've probably seen them but there seem to be some formatting issues.

libraries/AP_HAL_ChibiOS/hwdef/JFB200/README.md:8 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## Features"]
libraries/AP_HAL_ChibiOS/hwdef/JFB200/README.md:9 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- Processor"]
libraries/AP_HAL_ChibiOS/hwdef/JFB200/README.md:32 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## UART Mapping"]
libraries/AP_HAL_ChibiOS/hwdef/JFB200/README.md:33 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- SERIAL0 -> USB"]
libraries/AP_HAL_ChibiOS/hwdef/JFB200/README.md:57 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- PWM 1, 2, 3 and 4 in gro..."]
libraries/AP_HAL_ChibiOS/hwdef/JFB200/README.md:81 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- PWM(9) 50"]
libraries/AP_HAL_ChibiOS/hwdef/JFB200/README.md:178 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "### ADC/IO port"]
libraries/AP_HAL_ChibiOS/hwdef/JFB200/README.md:272 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "### RCIN port"]
libraries/AP_HAL_ChibiOS/hwdef/JFB200/README.md:281 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "### S.OUT port"]
libraries/AP_HAL_ChibiOS/hwdef/JFB200/README.md:290 MD022/blanks-around-headings/blanks-around-headers Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "### POWER1, POWER2 ports"]

@n-ito2222 n-ito2222 force-pushed the pr-Add_hwdef_JFB200 branch from f79c5e0 to 8459a8e Compare May 14, 2026 06:50
@rmackay9 rmackay9 dismissed Hwurzburg’s stale review May 14, 2026 07:30

images and README added

@rmackay9
Copy link
Copy Markdown
Contributor

@Hwurzburg, the README has been added with images

@andyp1per no pressure but if you get a chance to re-review that would be great, txs!

Copy link
Copy Markdown
Contributor

@Hwurzburg Hwurzburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preliminary review....cant fully review until next week due to home move:
-which UARTs have DMA should be noted
-PWM outputs noted as bi-dir buffered...you mean have BDShot capability...if so, this wording should be used in readme

  • CAN ports should be enabled in defaults.parm
  • why are PWM 1-8 being prevented from being used as GPIOs??
  • pinouts for UARTs should have the UART number included in the RX/TX pin names in the pinout lists (not serial port number...that translation is shown in the UART table section)
  • UART table can show connector name, BUT the default protocol should be shown also....ie TELEM1 is MAVLink2 (unless its obvious, like GPS)

@n-ito2222
Copy link
Copy Markdown
Contributor Author

n-ito2222 commented May 22, 2026

Hi, @Hwurzburg,

Thank you for the review.

We have decided that our JFB200 does not support bidirectional communication (BI-DIR).
PWM pins 1-8 are output-only and therefore do not support GPIO.

@andyp1per
Copy link
Copy Markdown
Contributor

Automated hwdef review (/hwdef-check)

PR 32786 · base upstream/master · new board JFB200 (JAE)

Build

  • ./waf configure --board JFB200: pass

Must-fix

  • None.

Should-fix

  • RSSI_ANA_PIN is a dead define (hwdef.dat:124). The consumed macro is BOARD_RSSI_ANA_PIN (AP_RSSI.cpp:32); RSSI_ANA_PIN is the runtime parameter name and nothing reads it as a define. As written, RSSI does not default to pin 10 despite the README documenting it (line 113). Change to define BOARD_RSSI_ANA_PIN 10 (PC0 = analog pin 10, confirmed in HAL_ANALOG_PINS).
  • README SERIAL8 mismatch (README.md:50): lists SERIAL8 -> USB (SLCAN), but hwdef sets HAL_OTG2_PROTOCOL SerialProtocol_MAVLink2 (hwdef.dat:51), so OTG2 ships as MAVLink2. Reconcile the README with the default (or change the default if SLCAN is intended).
  • Trailing whitespace flagged by git diff --check: hwdef.dat:374 (…DEFAULT 5 ), hwdef.dat:38, hwdef-bl.dat:32, and a trailing blank line at defaults.parm:7. The README also uses trailing-space markdown line-breaks throughout. Clean at least the .dat/.parm ones.

Notes

  • Commit prefixes (§6.6): hwdef:AP_HAL_ChibiOS: and Tools:bootloaders:. No AP_Bootloader: commit is needed — AP_HW_JFB200 (1200) is already in board_types.txt upstream, so the helper's "missing AP_Bootloader/bootloaders/AP_HAL_ChibiOS commits" is a false positive.
  • IMU SPI clock 20*MHZ for icm45686/iim42653 (hwdef.dat:193,196): §7.3 recommends 16*MHZ for ICM4xxxx on H7 — it rounds up to 24 MHz, exactly the parts' rated max. 20*MHZ risks rounding to 25 MHz, above the 24 MHz limit. Consider 16*MHZ.
  • STM32_ST_USE_TIMER 2 is a redundant override — no PWM uses TIM5 (the H7 default), so it's already free. Harmless and consistent between hwdef/hwdef-bl, but could be dropped.
  • Battery scales = 1 (hwdef.dat:102-105, real values left as comments): fine — BATT_MONITOR is off by default and the README states scaling is brick-dependent, so the user configures it.
  • DMA: dense board (19 shared streams) but H7 DMAMUX handles it; RC (UART8_RX) got a dedicated stream and all three IMU SPI RX have DMA — critical paths covered. NODMA I2C* + STM32_I2C_USE_DMA FALSE is well-justified in-file.
  • SERIAL_ORDER is Pixhawk-style and matches the README's Telem1/2/3 + GPS1/2 labels — the helper's natural-order warning is expected, not a defect.
  • defaults.parm mixes PARAM VALUE and PARAM=VALUE syntax; both parse, but worth making consistent. CAN_P*_DRIVER=1 / BRD_VBUS_MIN are acceptable hardware-enablement.
  • CS labels embed the bus token (IMU3_SPI1_CS etc.); builds fine because they're device-prefixed, but §7.3 prefers IMU3_CS-style names. Cosmetic.

Generated by Claude via /hwdef-check. Not a substitute for a human review pass.

@n-ito2222 n-ito2222 force-pushed the pr-Add_hwdef_JFB200 branch from 166f35a to 9c726ec Compare May 25, 2026 06:38
@n-ito2222
Copy link
Copy Markdown
Contributor Author

n-ito2222 commented May 25, 2026

Hi @andyp1per,

Thank you for the review.

I have applied the Should-fix. I have also applied some of the Notes.

I don't know how to remove "define CORE_CM7" from hwdef.dat. Simply removing "define CORE_CM7" results in a build error.

Copy link
Copy Markdown
Contributor

@andyp1per andyp1per left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

- SERIAL4 -> USART1 (GPS1, DMA-enabled)
- SERIAL5 -> USART2 (GPS2, DMA-enabled)
- SERIAL6 -> UART8 (RCIN, DMA-enabled)
- SERIAL7 -> USART6 (S.OUT, DMA-enabled)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- SERIAL7 -> USART6 (S.OUT, DMA-enabled)
- SERIAL7 -> USART6 (SBUSOUT, DMA-enabled)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Hwurzburg ,

Thanks,

SBUS is a registered trademark of Futaba Corporation.
To avoid unauthorized use, we have changed SBUSOUT to SOUT.

Copy link
Copy Markdown
Contributor

@Hwurzburg Hwurzburg May 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A trademark search shows that "SBUS" or "SBUSOUT" is not a registered trademark in the USPTO, WIPO, EUIPO. or JPO databases....SBUS is a freely used term in RC documentation..Futaba does trademark other terms like FASST, etc.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Hwurzburg ,

Thanks for about trademark of SBUSOUT.

I see this. We have changed to SBUSOUT.

Comment thread libraries/AP_HAL_ChibiOS/hwdef/JFB200/README.md Outdated
Comment thread libraries/AP_HAL_ChibiOS/hwdef/JFB200/README.md Outdated
Comment thread libraries/AP_HAL_ChibiOS/hwdef/JFB200/README.md Outdated
Comment thread libraries/AP_HAL_ChibiOS/hwdef/JFB200/hwdef.dat Outdated
Comment thread libraries/AP_HAL_ChibiOS/hwdef/JFB200/README.md Outdated
Comment thread libraries/AP_HAL_ChibiOS/hwdef/JFB200/README.md Outdated

The board has two dedicated power monitor ports on 8 pin connectors.
The correct battery setting parameters are dependent on the type of power brick which is connected.
Recomended input voltage is 4.9 to 5.5 volt.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you set defaults in hwdef for both monitors....list them here...special not about scales being set to "1" which need to be set by user (usually better to allow the defaults to be used instead of "1")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I modified hwdef.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hwdef still has set and enabled two analog monitors with some defaults as "1"...my original comment still applies

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @Hwurzburg.

I apologize for not understanding the meaning of your comment.
I added a list of default parameters for the battery monitor.

Comment thread libraries/AP_HAL_ChibiOS/hwdef/JFB200/README.md Outdated
Comment thread libraries/AP_HAL_ChibiOS/hwdef/JFB200/README.md
Copy link
Copy Markdown
Contributor

@Hwurzburg Hwurzburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

additional changes above

@n-ito2222 n-ito2222 force-pushed the pr-Add_hwdef_JFB200 branch from daaed99 to 1d58034 Compare May 27, 2026 07:03
@n-ito2222
Copy link
Copy Markdown
Contributor Author

Hi @Hwurzburg

Thanks for the review.
I have applied the review.

Comment thread libraries/AP_HAL_ChibiOS/hwdef/JFB200/README.md Outdated
Comment thread libraries/AP_HAL_ChibiOS/hwdef/JFB200/README.md Outdated

The board has two dedicated power monitor ports on 8 pin connectors.
The correct battery setting parameters are dependent on the type of power brick which is connected.
Recomended input voltage is 4.9 to 5.5 volt.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hwdef still has set and enabled two analog monitors with some defaults as "1"...my original comment still applies

Comment thread libraries/AP_HAL_ChibiOS/hwdef/JFB200/README.md
Comment thread libraries/AP_HAL_ChibiOS/hwdef/JFB200/README.md Outdated
@n-ito2222 n-ito2222 force-pushed the pr-Add_hwdef_JFB200 branch from 525c21c to 245dd53 Compare May 28, 2026 03:45
@n-ito2222
Copy link
Copy Markdown
Contributor Author

Hi @Hwurzburg

Thank you for your review.
Your review has been applied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants